﻿using ReflectionStudio.Components.UserControls;
using ReflectionStudio.Core.Events;
using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
namespace WPFExcelReport
{
    public partial class MainWindow
    {
        ViewModelBase vm;
        public MainWindow()
        {
            vm = new ViewModelBase();
            DataContext = vm;
            InitializeComponent();
            this.Name = "纱线管理";

        }
        string CurrentUI = "";
        MessageInfo msg;
        ViewBase ui;
        public override void OnWorkflowIDChange(MessageEventArgs e)
        {
            base.OnWorkflowIDChange(e);
            string wfid = e.Info.Details;
            msg = e.Info;
            switch (wfid)
            { 
                case "GSPR":
                    MainTab.Children.Clear();
                    ui = new TGSPR();
                    ui.ORDERNUM = msg.ORDER;
                    MainTab.Children.Add(ui);
                    break;
                case "DGS02":
                    MainTab.Children.Clear();
                    ui = new TDGS02();
                    ui.ORDERNUM = msg.ORDER;
                    MainTab.Children.Add(ui);
                    break;
                    
            } 
        }

        public override void Window_Loaded(object sender, RoutedEventArgs e)
        {

        }

    }
}
